package house;

/**
 * @author
 */
public class Loan {
    public static void main(String[] args) {
        double account = 6257.53;
        double add = 800 + 3400;

        double sum = 0;
        int month = 0;
        int year = 2021;
        int nowMonth = 6;
        for (int i = 0; i < 12; i++) {
            account += add;
            sum += account;

            month = i + nowMonth;
            if ((month - 1) % 12 == 0) {
                year += month / 12;
            }
            if (month > 12) {
                month -= (12 * (month / 12));
            }

            System.out.println(year + "年" + month + "月,社保金额: " + account);
        }
        System.out.println("-------------");
        System.out.println("一年内平均社保金额: " + sum / 12);
        System.out.println("贷款额度: " + sum / 12 * 15);
    }
}
